package cc.catface.h2.foreach;

import cc.catface.h2.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Repository
@Mapper
public interface ForeachDao {

    @Select("select * from user")
    List<User> selectAll();

    List<User> foreachList(@Param("names") List<String> names);

    List<User> foreachArray(@Param("names") String[] names);

    void foreachMap(@Param("map") Map<String, Object> map);
}
